<template>
	<view class="">
		<!-- 轮播图 -->
		<swiper class="screen-swiper square-dot" :indicator-dots="true" :circular="true"
		 :autoplay="true" interval="5000" duration="500">
			<swiper-item v-for="(item,index) in banners" :key="index">
				<image :src="item.img" mode="aspectFill" ></image>
			</swiper-item>
		</swiper>
		<!-- 导航栏 -->
		<view class="cu-list grid solids-bottom col-4 no-border">
			<view class="cu-item align-center" v-for="(item, index) in menus" :key="index">
				<view class="cu-avatar lg round" :style="{ backgroundImage: `url(${item.img})` }"></view>
				<text>{{ item.name }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import { homeInfo } from '@/api/api.js'
	export default {
		data() {
			return {
				banners: [], // 轮播图
				menus: [], // 导航菜单
			}
		},
		onLoad() {
			homeInfo().then(res => {
				this.banners = res.data.banners;
				this.menus = res.data.menus;
			})
		},
		methods: {

		}
	}
</script>

<style>
	
</style>
